#ifndef MENU_H
#define MENU_H

#include <QWidget>
#include <QLabel>
#include <QTime>
#include "util/util.h"
#include <QPushButton>

namespace Ui {
class Menu;
}

class Menu : public QWidget
{
    Q_OBJECT

public:
    explicit Menu(QWidget *parent = 0);
    ~Menu();
    void setUiStyle();
    void updateMantuableDate();
    void connectSignalsAndSlots();

signals:
    void go2ReturnZero();
    void go2Manual();
    void go2Automatic();
    void go2UserSwitch();
    void go2SystemSetting();
    void go2ExternalMemory();
    void go2CalTimer();
    void go2TeachMode();
    void go2ProgramEditor(const QString &programName);
    void IfTcpCommunicationGoOn(bool ifTcpGoOn);
    void AbortTcpConnect();
    void go2RS422Communication();
    void go2SpeedAddDec();

private:
    Ui::Menu *ui;
    QDialog *dialog;

private slots:
    void pushReturnZero();
    void pushManual();
    void pushAutomatic();
    void pushUserSwitch();
    void pushSystemSetting();
    void pushExternalMemory();
    void pushCalTimer();
    void pushTeachMode();
    void pushProgramEditor();
    void pushSpeedAddDec();
    void flipTcpCommunication();
    void abortTcpCommunication();
    void pushRS422Communication();
    void changeContentDisplayState();
};

#endif // MENU_H
